/**
 * @Author: Bobby
 * @Date: 2022-02-15 13:14:17
 * @LastEditTime: 2022-03-07 10:37:41
 * @LastEditors: Bobby
 * @Description:
 * @FilePath: \wms-v2\src\ve\common\components\baseComs\layout\uiFlexbox.js
 * @CIMC-V2
 */

import { exInputNumber, exSelect } from '@ve/common/components/extension'
import { exSwitch } from '../../extension/index'

export default {
  VERSION: '20220408',
  type: 'uiSelfAdaption',
  name: '自适应盒子',
  icon: 'checkbox-blank-line',
  svg: 'self-adaption',
  //数据别名
  // dataName: 'uiFlexbox_data',
  //扩展
  extension: {
    isLine: exSwitch('是否开启线性流动效果', false),
    boxHeight: exInputNumber('高度', 50, 1, 100),
    boxInnerWidth: exInputNumber('分辨率宽', 1920, 1, 100000),
    boxInnerHeight: exInputNumber('分辨率高', 1080, 1, 100000),
    // requestSet: {
    //   type: 'exRequestSet',
    //   name: '接口配置',
    //   value: {
    //     api: '/wms/wms-web',
    //     method: 'wms.screen.query.test',
    //     getDataKey: 'wms.screen.query.test',
    //     loopRequest: false,
    //     loopTime: 3000,
    //     nameKey: '',
    //     valueKey: '',
    //     busList: [],
    //     dataObj: {},
    //     data: [
    //       { key: '#LIMIT#', value: '1' },
    //       { key: '#PAGE_SIZE#', value: '10' },
    //     ],
    //     resList: [],
    //   },
    // },
    flexDer: exSelect('子组件排布方向', 'row', [
      {
        label: '横',
        value: 'row',
      },
      {
        label: '竖',
        value: 'col',
      },
    ]),
    justifyAlign: {
      type: 'exRadioGroup',
      name: '水平位置',
      value: 'start',
      list: [
        {
          label: '居左',
          value: 'start',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居右',
          value: 'end',
        },
      ],
    },
    itemsAlign: {
      type: 'exRadioGroup',
      name: '垂直方向',
      value: 'flex-start',
      list: [
        {
          label: '居上',
          value: 'flex-start',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居下',
          value: 'flex-end',
        },
      ],
    },
    bgColor: {
      type: 'exSetChartColor',
      name: '背景颜色',
      value: '#fff',
    },
    padding: {
      type: 'exInputNumber',
      name: '内边距',
      value: 1,
      min: 0,
      max: 12,
    },
    justify: {
      type: 'exJustifySelect',
      name: '换行',
      value: 'flex-wrap',
    },
    shadow: {
      type: 'exShadowSelect',
      name: '盒阴影',
      value: 'shadow-none',
    },
    border: {
      type: 'exBorderSelect',
      name: '边框厚度',
      value: 'border-0',
    },
    rounded: {
      type: 'exRoundedSelect',
      name: '边框圆角',
      value: 'rounded-none',
    },
    labelText: {
      type: 'exInput',
      name: '标签',
      value: '',
    },
    labelPosition: {
      type: 'exRadioGroup',
      name: '标签位置',
      value: 'center',
      list: [
        {
          label: '居左',
          value: 'left',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居右',
          value: 'right',
        },
      ],
    },
    topMargin: {
      type: 'exInputNumber',
      name: '上外边距',
      value: 0,
    },
    rightMargin: {
      type: 'exInputNumber',
      name: '右外边距',
      value: 0,
    },
    bottomMargin: {
      type: 'exInputNumber',
      name: '下外边距',
      value: 0,
    },
    leftMargin: {
      type: 'exInputNumber',
      name: '左外边距',
      value: 0,
    },
  },
  list: [],
}
